3.1.19 \(\int \frac {\sec ^2(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx\) [19]
Optimal. Leaf size=275 \[ \frac {2 b c \left (1+\frac {b^2-2 a c}{b \sqrt {b^2-4 a c}}\right ) \text {ArcTan}\left (\frac {\sqrt {b-2 c-\sqrt {b^2-4 a c}} \tan \left (\frac {x}{2}\right )}{\sqrt {b+2 c-\sqrt {b^2-4 a c}}}\right )}{a^2 \sqrt {b-2 c-\sqrt {b^2-4 a c}} \sqrt {b+2 c-\sqrt {b^2-4 a c}}}+\frac {2 b c \left (1-\frac {b^2-2 a c}{b \sqrt {b^2-4 a c}}\right ) \text {ArcTan}\left (\frac {\sqrt {b-2 c+\sqrt {b^2-4 a c}} \tan \left (\frac {x}{2}\right )}{\sqrt {b+2 c+\sqrt {b^2-4 a c}}}\right )}{a^2 \sqrt {b-2 c+\sqrt {b^2-4 a c}} \sqrt {b+2 c+\sqrt {b^2-4 a c}}}-\frac {b \tanh ^{-1}(\sin (x))}{a^2}+\frac {\tan (x)}{a} \]
[Out]
-b*arctanh(sin(x))/a^2+2*b*c*arctan((b-2*c-(-4*a*c+b^2)^(1/2))^(1/2)*tan(1/2*x)/(b+2*c-(-4*a*c+b^2)^(1/2))^(1/
2))*(1+(-2*a*c+b^2)/b/(-4*a*c+b^2)^(1/2))/a^2/(b-2*c-(-4*a*c+b^2)^(1/2))^(1/2)/(b+2*c-(-4*a*c+b^2)^(1/2))^(1/2
)+2*b*c*arctan((b-2*c+(-4*a*c+b^2)^(1/2))^(1/2)*tan(1/2*x)/(b+2*c+(-4*a*c+b^2)^(1/2))^(1/2))*(1+(2*a*c-b^2)/b/
(-4*a*c+b^2)^(1/2))/a^2/(b-2*c+(-4*a*c+b^2)^(1/2))^(1/2)/(b+2*c+(-4*a*c+b^2)^(1/2))^(1/2)+tan(x)/a
________________________________________________________________________________________
Rubi [A]
time = 0.92, antiderivative size = 275, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.368, Rules used = {3338, 3374,
2738, 211, 3855, 3852, 8} \begin {gather*} \frac {2 b c \left (\frac {b^2-2 a c}{b \sqrt {b^2-4 a c}}+1\right ) \text {ArcTan}\left (\frac {\tan \left (\frac {x}{2}\right ) \sqrt {-\sqrt {b^2-4 a c}+b-2 c}}{\sqrt {-\sqrt {b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt {-\sqrt {b^2-4 a c}+b-2 c} \sqrt {-\sqrt {b^2-4 a c}+b+2 c}}+\frac {2 b c \left (1-\frac {b^2-2 a c}{b \sqrt {b^2-4 a c}}\right ) \text {ArcTan}\left (\frac {\tan \left (\frac {x}{2}\right ) \sqrt {\sqrt {b^2-4 a c}+b-2 c}}{\sqrt {\sqrt {b^2-4 a c}+b+2 c}}\right )}{a^2 \sqrt {\sqrt {b^2-4 a c}+b-2 c} \sqrt {\sqrt {b^2-4 a c}+b+2 c}}-\frac {b \tanh ^{-1}(\sin (x))}{a^2}+\frac {\tan (x)}{a} \end {gather*}
Antiderivative was successfully verified.
[In]
Int[Sec[x]^2/(a + b*Cos[x] + c*Cos[x]^2),x]
[Out]
(2*b*c*(1 + (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b +
2*c - Sqrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c - Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c - Sqrt[b^2 - 4*a*c]]) + (2*b*c*
(1 - (b^2 - 2*a*c)/(b*Sqrt[b^2 - 4*a*c]))*ArcTan[(Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Tan[x/2])/Sqrt[b + 2*c + S
qrt[b^2 - 4*a*c]]])/(a^2*Sqrt[b - 2*c + Sqrt[b^2 - 4*a*c]]*Sqrt[b + 2*c + Sqrt[b^2 - 4*a*c]]) - (b*ArcTanh[Sin
[x]])/a^2 + Tan[x]/a
Rule 8
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
Rule 211
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3338
Int[cos[(d_.) + (e_.)*(x_)]^(m_.)*((a_.) + cos[(d_.) + (e_.)*(x_)]^(n_.)*(b_.) + cos[(d_.) + (e_.)*(x_)]^(n2_.
)*(c_.))^(p_), x_Symbol] :> Int[ExpandTrig[cos[d + e*x]^m*(a + b*cos[d + e*x]^n + c*cos[d + e*x]^(2*n))^p, x],
x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && IntegersQ[m, n, p]
Rule 3374
Int[(cos[(d_.) + (e_.)*(x_)]*(B_.) + (A_))/((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + cos[(d_.) + (e_.)*(x_)]^2*
(c_.)), x_Symbol] :> Module[{q = Rt[b^2 - 4*a*c, 2]}, Dist[B + (b*B - 2*A*c)/q, Int[1/(b + q + 2*c*Cos[d + e*x
]), x], x] + Dist[B - (b*B - 2*A*c)/q, Int[1/(b - q + 2*c*Cos[d + e*x]), x], x]] /; FreeQ[{a, b, c, d, e, A, B
}, x] && NeQ[b^2 - 4*a*c, 0]
Rule 3852
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Rule 3855
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rubi steps
\begin {align*} \int \frac {\sec ^2(x)}{a+b \cos (x)+c \cos ^2(x)} \, dx &=\int \left (\frac {b^2 \left (1-\frac {a c}{b^2}\right )+b c \cos (x)}{a^2 \left (a+b \cos (x)+c \cos ^2(x)\right )}-\frac {b \sec (x)}{a^2}+\frac {\sec ^2(x)}{a}\right ) \, dx\\ &=\frac {\int \frac {b^2 \left (1-\frac {a c}{b^2}\right )+b c \cos (x)}{a+b \cos (x)+c \cos ^2(x)} \, dx}{a^2}+\frac {\int \sec ^2(x) \, dx}{a}-\frac {b \int \sec (x) \, dx}{a^2}\\ &=-\frac {b \tanh ^{-1}(\sin (x))}{a^2}-\frac {\text {Subst}(\int 1 \, dx,x,-\tan (x))}{a}+\frac {\left (c \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{b+\sqrt {b^2-4 a c}+2 c \cos (x)} \, dx}{a^2}+\frac {\left (c \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right )\right ) \int \frac {1}{b-\sqrt {b^2-4 a c}+2 c \cos (x)} \, dx}{a^2}\\ &=-\frac {b \tanh ^{-1}(\sin (x))}{a^2}+\frac {\tan (x)}{a}+\frac {\left (2 c \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right )\right ) \text {Subst}\left (\int \frac {1}{b+2 c+\sqrt {b^2-4 a c}+\left (b-2 c+\sqrt {b^2-4 a c}\right ) x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{a^2}+\frac {\left (2 c \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right )\right ) \text {Subst}\left (\int \frac {1}{b+2 c-\sqrt {b^2-4 a c}+\left (b-2 c-\sqrt {b^2-4 a c}\right ) x^2} \, dx,x,\tan \left (\frac {x}{2}\right )\right )}{a^2}\\ &=\frac {2 c \left (b+\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {b-2 c-\sqrt {b^2-4 a c}} \tan \left (\frac {x}{2}\right )}{\sqrt {b+2 c-\sqrt {b^2-4 a c}}}\right )}{a^2 \sqrt {b-2 c-\sqrt {b^2-4 a c}} \sqrt {b+2 c-\sqrt {b^2-4 a c}}}+\frac {2 c \left (b-\frac {b^2-2 a c}{\sqrt {b^2-4 a c}}\right ) \tan ^{-1}\left (\frac {\sqrt {b-2 c+\sqrt {b^2-4 a c}} \tan \left (\frac {x}{2}\right )}{\sqrt {b+2 c+\sqrt {b^2-4 a c}}}\right )}{a^2 \sqrt {b-2 c+\sqrt {b^2-4 a c}} \sqrt {b+2 c+\sqrt {b^2-4 a c}}}-\frac {b \tanh ^{-1}(\sin (x))}{a^2}+\frac {\tan (x)}{a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.23, size = 348, normalized size = 1.27 \begin {gather*} \frac {-\frac {\sqrt {2} c \left (-b^2+2 a c+b \sqrt {b^2-4 a c}\right ) \tanh ^{-1}\left (\frac {\left (b-2 c+\sqrt {b^2-4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {-2 b^2+4 c (a+c)-2 b \sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \sqrt {-b^2+2 c (a+c)-b \sqrt {b^2-4 a c}}}+\frac {\sqrt {2} c \left (b^2-2 a c+b \sqrt {b^2-4 a c}\right ) \tanh ^{-1}\left (\frac {\left (-b+2 c+\sqrt {b^2-4 a c}\right ) \tan \left (\frac {x}{2}\right )}{\sqrt {-2 b^2+4 c (a+c)+2 b \sqrt {b^2-4 a c}}}\right )}{\sqrt {b^2-4 a c} \sqrt {-b^2+2 c (a+c)+b \sqrt {b^2-4 a c}}}+b \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )-b \log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )+\frac {a \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )}+\frac {a \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}}{a^2} \end {gather*}
Antiderivative was successfully verified.
[In]
Integrate[Sec[x]^2/(a + b*Cos[x] + c*Cos[x]^2),x]
[Out]
(-((Sqrt[2]*c*(-b^2 + 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTanh[((b - 2*c + Sqrt[b^2 - 4*a*c])*Tan[x/2])/Sqrt[-2*b^
2 + 4*c*(a + c) - 2*b*Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) - b*Sqrt[b^2 - 4*a*c]]))
+ (Sqrt[2]*c*(b^2 - 2*a*c + b*Sqrt[b^2 - 4*a*c])*ArcTanh[((-b + 2*c + Sqrt[b^2 - 4*a*c])*Tan[x/2])/Sqrt[-2*b^
2 + 4*c*(a + c) + 2*b*Sqrt[b^2 - 4*a*c]]])/(Sqrt[b^2 - 4*a*c]*Sqrt[-b^2 + 2*c*(a + c) + b*Sqrt[b^2 - 4*a*c]])
+ b*Log[Cos[x/2] - Sin[x/2]] - b*Log[Cos[x/2] + Sin[x/2]] + (a*Sin[x/2])/(Cos[x/2] - Sin[x/2]) + (a*Sin[x/2])/
(Cos[x/2] + Sin[x/2]))/a^2
________________________________________________________________________________________
Maple [A]
time = 2.56, size = 354, normalized size = 1.29
| | |
method |
result |
size |
| | |
default |
\(-\frac {1}{a \left (\tan \left (\frac {x}{2}\right )-1\right )}+\frac {b \ln \left (\tan \left (\frac {x}{2}\right )-1\right )}{a^{2}}+\frac {2 \left (a -b +c \right ) \left (\frac {\left (-\sqrt {-4 a c +b^{2}}\, a c +\sqrt {-4 a c +b^{2}}\, b^{2}-\sqrt {-4 a c +b^{2}}\, b c -3 c a b +2 a \,c^{2}+b^{3}-b^{2} c \right ) \arctan \left (\frac {\left (a -b +c \right ) \tan \left (\frac {x}{2}\right )}{\sqrt {\left (\sqrt {-4 a c +b^{2}}+a -c \right ) \left (a -b +c \right )}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \left (a -b +c \right ) \sqrt {\left (\sqrt {-4 a c +b^{2}}+a -c \right ) \left (a -b +c \right )}}+\frac {\left (-\sqrt {-4 a c +b^{2}}\, a c +\sqrt {-4 a c +b^{2}}\, b^{2}-\sqrt {-4 a c +b^{2}}\, b c +3 c a b -2 a \,c^{2}-b^{3}+b^{2} c \right ) \arctanh \left (\frac {\left (-a +b -c \right ) \tan \left (\frac {x}{2}\right )}{\sqrt {\left (\sqrt {-4 a c +b^{2}}-a +c \right ) \left (a -b +c \right )}}\right )}{2 \sqrt {-4 a c +b^{2}}\, \left (a -b +c \right ) \sqrt {\left (\sqrt {-4 a c +b^{2}}-a +c \right ) \left (a -b +c \right )}}\right )}{a^{2}}-\frac {1}{a \left (\tan \left (\frac {x}{2}\right )+1\right )}-\frac {b \ln \left (\tan \left (\frac {x}{2}\right )+1\right )}{a^{2}}\) |
\(354\) |
risch |
\(\text {Expression too large to display}\) |
\(2641\) |
| | |
|
|
|
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x,method=_RETURNVERBOSE)
[Out]
-1/a/(tan(1/2*x)-1)+1/a^2*b*ln(tan(1/2*x)-1)+2/a^2*(a-b+c)*(1/2*(-(-4*a*c+b^2)^(1/2)*a*c+(-4*a*c+b^2)^(1/2)*b^
2-(-4*a*c+b^2)^(1/2)*b*c-3*c*a*b+2*a*c^2+b^3-b^2*c)/(-4*a*c+b^2)^(1/2)/(a-b+c)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+
c))^(1/2)*arctan((a-b+c)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)+a-c)*(a-b+c))^(1/2))+1/2*(-(-4*a*c+b^2)^(1/2)*a*c+(-4
*a*c+b^2)^(1/2)*b^2-(-4*a*c+b^2)^(1/2)*b*c+3*c*a*b-2*a*c^2-b^3+b^2*c)/(-4*a*c+b^2)^(1/2)/(a-b+c)/(((-4*a*c+b^2
)^(1/2)-a+c)*(a-b+c))^(1/2)*arctanh((-a+b-c)*tan(1/2*x)/(((-4*a*c+b^2)^(1/2)-a+c)*(a-b+c))^(1/2)))-1/a/(tan(1/
2*x)+1)-1/a^2*b*ln(tan(1/2*x)+1)
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="maxima")
[Out]
1/2*(2*(a^2*cos(2*x)^2 + a^2*sin(2*x)^2 + 2*a^2*cos(2*x) + a^2)*integrate(2*(2*b^2*c*cos(3*x)^2 + 2*b^2*c*cos(
x)^2 + 2*b^2*c*sin(3*x)^2 + 2*b^2*c*sin(x)^2 + b*c^2*cos(x) + 4*(2*a*b^2 - a*c^2 - (2*a^2 - b^2)*c)*cos(2*x)^2
+ 4*(2*a*b^2 - a*c^2 - (2*a^2 - b^2)*c)*sin(2*x)^2 + 2*(2*b^3 + b*c^2)*sin(2*x)*sin(x) + (b*c^2*cos(3*x) + b*
c^2*cos(x) + 2*(b^2*c - a*c^2)*cos(2*x))*cos(4*x) + (4*b^2*c*cos(x) + b*c^2 + 2*(2*b^3 + b*c^2)*cos(2*x))*cos(
3*x) + 2*(b^2*c - a*c^2 + (2*b^3 + b*c^2)*cos(x))*cos(2*x) + (b*c^2*sin(3*x) + b*c^2*sin(x) + 2*(b^2*c - a*c^2
)*sin(2*x))*sin(4*x) + 2*(2*b^2*c*sin(x) + (2*b^3 + b*c^2)*sin(2*x))*sin(3*x))/(a^2*c^2*cos(4*x)^2 + 4*a^2*b^2
*cos(3*x)^2 + 4*a^2*b^2*cos(x)^2 + a^2*c^2*sin(4*x)^2 + 4*a^2*b^2*sin(3*x)^2 + 4*a^2*b^2*sin(x)^2 + 4*a^2*b*c*
cos(x) + a^2*c^2 + 4*(4*a^4 + 4*a^3*c + a^2*c^2)*cos(2*x)^2 + 4*(4*a^4 + 4*a^3*c + a^2*c^2)*sin(2*x)^2 + 8*(2*
a^3*b + a^2*b*c)*sin(2*x)*sin(x) + 2*(2*a^2*b*c*cos(3*x) + 2*a^2*b*c*cos(x) + a^2*c^2 + 2*(2*a^3*c + a^2*c^2)*
cos(2*x))*cos(4*x) + 4*(2*a^2*b^2*cos(x) + a^2*b*c + 2*(2*a^3*b + a^2*b*c)*cos(2*x))*cos(3*x) + 4*(2*a^3*c + a
^2*c^2 + 2*(2*a^3*b + a^2*b*c)*cos(x))*cos(2*x) + 4*(a^2*b*c*sin(3*x) + a^2*b*c*sin(x) + (2*a^3*c + a^2*c^2)*s
in(2*x))*sin(4*x) + 8*(a^2*b^2*sin(x) + (2*a^3*b + a^2*b*c)*sin(2*x))*sin(3*x)), x) - (b*cos(2*x)^2 + b*sin(2*
x)^2 + 2*b*cos(2*x) + b)*log(cos(x)^2 + sin(x)^2 + 2*sin(x) + 1) + (b*cos(2*x)^2 + b*sin(2*x)^2 + 2*b*cos(2*x)
+ b)*log(cos(x)^2 + sin(x)^2 - 2*sin(x) + 1) + 4*a*sin(2*x))/(a^2*cos(2*x)^2 + a^2*sin(2*x)^2 + 2*a^2*cos(2*x
) + a^2)
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="fricas")
[Out]
Timed out
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec ^{2}{\left (x \right )}}{a + b \cos {\left (x \right )} + c \cos ^{2}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(x)**2/(a+b*cos(x)+c*cos(x)**2),x)
[Out]
Integral(sec(x)**2/(a + b*cos(x) + c*cos(x)**2), x)
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 4784 vs.
\(2 (234) = 468\).
time = 3.49, size = 4784, normalized size = 17.40 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
integrate(sec(x)^2/(a+b*cos(x)+c*cos(x)^2),x, algorithm="giac")
[Out]
(2*a^2*b^5 - 2*b^7 - 14*a^3*b^3*c - 6*a^2*b^4*c + 26*a*b^5*c - 2*b^6*c + 24*a^4*b*c^2 + 36*a^3*b^2*c^2 - 108*a
^2*b^3*c^2 + 16*a*b^4*c^2 + 2*b^5*c^2 - 48*a^4*c^3 + 144*a^3*b*c^3 - 24*a^2*b^2*c^3 - 22*a*b^3*c^3 + 2*b^4*c^3
- 32*a^3*c^4 + 56*a^2*b*c^4 - 12*a*b^2*c^4 + 16*a^2*c^5 + 3*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a
- b + c))*a^2*b^4 - 2*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^5 - 5*sqrt(a^2 - a*b +
b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*b^6 - 15*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c)
)*a^3*b^2*c + 13*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a^2*b^3*c + 37*sqrt(a^2 - a*b + b
*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^4*c + sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c)
)*b^5*c + 12*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a^4*c^2 - 20*sqrt(a^2 - a*b + b*c - c
^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a^3*b*c^2 - 82*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))
*a^2*b^2*c^2 + 4*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^3*c^2 + sqrt(a^2 - a*b + b*c
- c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*b^4*c^2 + 56*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c)
)*a^3*c^3 - 32*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a^2*b*c^3 + sqrt(a^2 - a*b + b*c -
c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^2*c^3 - 5*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))
*b^3*c^3 - 20*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a^2*c^4 + 20*sqrt(a^2 - a*b + b*c -
c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*a*b*c^4 + 3*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*s
qrt(b^2 - 4*a*c)*a^2*b^3 - 2*(b^2 - 4*a*c)*a^2*b^3 - 2*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b +
c))*sqrt(b^2 - 4*a*c)*a*b^4 - 5*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)
*b^5 + 2*(b^2 - 4*a*c)*b^5 - 9*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)*a
^3*b*c + 6*(b^2 - 4*a*c)*a^3*b*c + 9*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*
a*c)*a^2*b^2*c + 6*(b^2 - 4*a*c)*a^2*b^2*c + 27*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sq
rt(b^2 - 4*a*c)*a*b^3*c - 18*(b^2 - 4*a*c)*a*b^3*c + sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c
))*sqrt(b^2 - 4*a*c)*b^4*c + 2*(b^2 - 4*a*c)*b^4*c - 6*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b +
c))*sqrt(b^2 - 4*a*c)*a^3*c^2 - 12*(b^2 - 4*a*c)*a^3*c^2 - 38*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^2 - 4*a*c)*
(a - b + c))*sqrt(b^2 - 4*a*c)*a^2*b*c^2 + 36*(b^2 - 4*a*c)*a^2*b*c^2 + 6*sqrt(a^2 - a*b + b*c - c^2 + sqrt(b^
2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)*a*b^2*c^2 - 8*(b^2 - 4*a*c)*a*b^2*c^2 + sqrt(a^2 - a*b + b*c - c^2 +
sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)*b^3*c^2 - 2*(b^2 - 4*a*c)*b^3*c^2 - 28*sqrt(a^2 - a*b + b*c
- c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)*a^2*c^3 - 8*(b^2 - 4*a*c)*a^2*c^3 + 3*sqrt(a^2 - a*b
+ b*c - c^2 + sqrt(b^2 - 4*a*c)*(a - b + c))*sqrt(b^2 - 4*a*c)*a*b*c^3 + 14*(b^2 - 4*a*c)*a*b*c^3 - 5*sqrt(a^2
- a*b + b*c - c^2 + sqrt(b^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4 + 16*a^2*c^5 - 3*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)
*(a - b + c))*a^2*b^4 + 2*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^5 + 5*sqrt(a^2 - a*b
+ b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*b^6 + 15*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b +
c))*a^3*b^2*c - 13*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*a^2*b^3*c - 37*sqrt(a^2 - a*b
+ b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*a*b^4*c - sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b +
c))*b^5*c - 12*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*a^4*c^2 + 20*sqrt(a^2 - a*b + b*c
- c^2 - sqrt(b^2 - 4*a*c)*(a - b + c))*a^3*b*c^2 + 82*sqrt(a^2 - a*b + b*c - c^2 - sqrt(b^2 - 4*a*c)*(a - b +
c))*a^2*b^2*c^2 - 4*sqrt(a^2 - a*b + b*c - c^2 ...
________________________________________________________________________________________
Mupad [B]
time = 13.18, size = 2500, normalized size = 9.09 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
int(1/(cos(x)^2*(a + b*cos(x) + c*cos(x)^2)),x)
[Out]
(b*atan(((b*((8192*tan(x/2)*(a*b^8 + 5*b^8*c - b^9 + a^2*c^7 + a^3*c^6 + b^4*c^5 - 5*b^5*c^4 + 10*b^6*c^3 - 10
*b^7*c^2 - 2*a*b^2*c^6 + 14*a*b^3*c^5 - 35*a*b^4*c^4 + 40*a*b^5*c^3 - 20*a*b^6*c^2 - a^2*b*c^6 - 6*a^2*b^6*c +
10*a^2*b^2*c^5 - 20*a^2*b^3*c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 + a^2*b^2*c^4 + a*b*c^6))
/a^4 + (b*((8192*tan(x/2)*(a*b^8 + 5*b^8*c - b^9 + a^2*c^7 + a^3*c^6 + b^4*c^5 - 5*b^5*c^4 + 10*b^6*c^3 - 10*b
^7*c^2 - 2*a*b^2*c^6 + 14*a*b^3*c^5 - 35*a*b^4*c^4 + 40*a*b^5*c^3 - 20*a*b^6*c^2 - a^2*b*c^6 - 6*a^2*b^6*c + 1
0*a^2*b^2*c^5 - 20*a^2*b^3*c^4 + 5*a^2*b^4*c^3 + 11*a^2*b^5*c^2 + 10*a^3*b^2*c^4 - 18*a^3*b^3*c^3 + 9*a^3*b^4*
c^2 - 2*a^4*b^2*c^3 + 2*a*b^7*c))/a^4 + (b*((81...
________________________________________________________________________________________